@import '~antd/lib/style/themes/default.less';

.textOverflow() {
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
  white-space: nowrap;
}

.textOverflowMulti(@line: 3, @bg: #fff) {
  overflow: hidden;
  position: relative;
  line-height: 1.5em;
  max-height: @line * 1.5em;
  text-align: justify;
  margin-right: -1em;
  padding-right: 1em;
  &:before {
    background: @bg;
    content: '...';
    padding: 0 1px;
    position: absolute;
    right: 14px;
    bottom: 0;
  }
  &:after {
    background: white;
    content: '';
    margin-top: 0.2em;
    position: absolute;
    right: 14px;
    width: 1em;
    height: 1em;
  }
}
.red {
  color: 'red';
}
.hide {
  display: none;
}
.show {
  display: block;
}
// mixins for clearfix
// ------------------------
.clearfix() {
  zoom: 1;
  &:before,
  &:after {
    content: ' ';
    display: table;
  }
  &:after {
    clear: both;
    visibility: hidden;
    font-size: 0;
    height: 0;
  }
}

//表格查询
.tableList {
  .tableListOperator {
    margin-bottom: 16px;
    button {
      margin-right: 8px;
    }
  }
}

.tableListForm {
  :global {
    .ant-legacy-form-item {
      margin-bottom: 24px;
      margin-right: 0;
      display: flex;
      > .ant-legacy-form-item-label {
        // width: auto;
        line-height: 32px;
        padding-right: 8px;
      }
      .ant-legacy-form-item-control {
        line-height: 32px;
      }
    }
    .ant-legacy-form-item-control-wrapper {
      flex: 1;
    }
  }
  .submitButtons {
    display: block;
    white-space: nowrap;
    margin-bottom: 24px;
  }
}
.listBtn {
  margin-right: 8px;
}
.iconStyle {
  font-size: 12px;
}

@media screen and (max-width: @screen-lg) {
  .tableListForm :global(.ant-legacy-form-item) {
    margin-right: 24px;
  }
}

@media screen and (max-width: @screen-md) {
  .tableListForm :global(.ant-legacy-form-item) {
    margin-right: 8px;
  }
}
//表单验证信息提示
.errorMsg {
  :global {
    .has-error .ant-legacy-form-explain,
    .has-error .ant-legacy-form-split {
      position: absolute;
    }
    .errorMsgRight {
      right: 0;
    }
  }
}

//ui 边距
.searchCard {
  :global {
    margin-bottom: 16px;
    border: none;
    & .ant-card-body {
      padding-bottom: 0;
    }
  }
}
.tableCard {
  :global {
    border: none;
    & .ant-card-body {
      padding: 24px 16px;
    }
  }
}
.tabCard {
  :global {
    border: none;
    & .ant-card-body {
      padding: 16px;
    }
  }
}
